<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 检测数据类型
        let str = "Hello, World!";
        let num = 42;
        let isCool = true;
        let nothing = null;
        let notDefined;

        document.write(`str的类型是: ${typeof str}<br>`);
        document.write(`num的类型是: ${typeof num}<br>`);
        document.write(`isCool的类型是: ${typeof isCool}<br>`);
        document.write(`nothing的类型是: ${typeof nothing}<br>`);
        document.write(`notDefined的类型是: ${typeof notDefined}<br>`);
    </script>
</body>
</html>